import Svg,{
  Circle,
  Ellipse,
  G,
  Text,
  TSpan,
  TextPath,
  Path,
  Polygon,
  Polyline,
  Line,
  Rect,
  Use,
  Image,
  Symbol,
  Defs,
  LinearGradient,
  RadialGradient,
  Stop,
  ClipPath,
  Pattern,
  Mask,
} from 'react-native-svg';

/* Use this if you are using Expo
import { Svg } from 'expo';
const { Circle, Rect } = Svg;
*/

import React from 'react';
import { View, StyleSheet, Dimensions } from 'react-native';

// Percentages work in plain react-native but aren't supported in Expo yet, workaround with this or onLayout
const { width, height } = Dimensions.get('window');

export default class SvgExample10 extends React.Component {


  render() {
    return (
      <View style={{...StyleSheet.absoluteFill,alignItems: 'center', justifyContent: 'center' }}>
        <Svg
          height="100"
          width="200"
        >
          <G
            rotation="10"
            origin="100, 50"
          >
            <Line
              x1="60"
              y1="10"
              x2="140"
              y2="10"
              stroke="#060"
            />

            <Rect
              x="60"
              y="20"
              height="50"
              width="80"
              stroke="#060"
              fill="#060"
            />

            <Text
              x="100"
              y="75"
              stroke="#600"
              fill="#600"
              textAnchor="middle"
            >
              Text grouped with shapes</Text>
          </G>
        </Svg>
      </View>
    );
  }
}